package com.tfriend.traffic.controller;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.multiaction.MultiActionController;
import org.springframework.web.servlet.view.RedirectView;

import com.tfriend.traffic.comp.trafficData;
import com.tfriend.traffic.comp.trafficService;


public class trafficController extends MultiActionController{
	
	@Autowired
	private trafficService trafficService;

	public ModelAndView trafficData(HttpServletRequest request, HttpServletResponse response) throws Exception {
		request.setCharacterEncoding("UTF-8");
		StringBuffer data = trafficService.getTrafficData();
		
		return new ModelAndView("traffic/trafficData").addObject("data", data);
	}
		
}
